package com.study.ribbon.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

import javax.annotation.Resource;

@RestController
public class RibbonController {

    @Resource
    private RestTemplate restTemplate;

    @GetMapping("/ribbon")
    public String test() {
        String res = restTemplate.getForObject("http://eureka-client-test/testClient/", String.class);
        return res + ", success";
    }
}
